<template>
		<el-tree 
		:data="powers" 
		:props="defaultProps" 
		@node-click="handleNodeClick" 
		:default-expand-all="true"
		@click="updatePower"
		style="opacity: 0.8;">
	</el-tree>
	
	
</template>

<script>
export default{
	data(){
		return{
			powers:[],
			defaultProps:{
				// 数据展示的下一层树形结构
				children: 'children',
				// 树形结构展示的内容
				label: 'powername'
			}
		}
	},
	methods:{
		handleNodeClick(){
			
		},
		async getPower(){
			var res = await this.$http.get("selectOneTwoPower")
			this.powers = res.data.data
			console.log(this.powers)
		},
		updatePower(){
			
		}
	},
	mounted() {
		this.getPower()
	}
}
</script>

<style scoped>
</style>
